package org.zfes.snowier.cloud.zbss.pmp.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.zfes.snowier.common.dao.mybatis.BaseMapper;
import org.zfes.snowier.common.dao.params.ParamMap;
import org.zfes.snowier.cloud.zbss.pmp.model.PmpRequires;
import org.zfes.snowier.core.data.ComboboVo;
import org.zfes.snowier.core.data.Record;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PmpRequiresMapper extends BaseMapper<PmpRequires>{
	
	Long selectListCount(ParamMap params);
	
	List<Record> selectMapListPage(ParamMap params);
	
	List<PmpRequires> selectModelListPage(ParamMap params);
	
	
	int updateStatus(@Param("id")Long id, @Param("status")Byte status);

	PmpRequires selectRootRequire(@Param("projectId")Long projectId);

	int updateModuleName(@Param("id")Long id, @Param("newname")String newname);
	
	int updateTreeCode(@Param("id")Long id, @Param("treeCode")String treeCode);
	
	int updateOrderNum(@Param("id")Long id, @Param("orderNum")Integer orderNum);

	List<PmpRequires> selectByProjectId(@Param("projectId")Long projectId, @Param("status")Byte status);

	int updatePriority(@Param("id")Long id, @Param("priority")Byte priority);

	PmpRequires selectRootByProjectId(@Param("projectId")Long projectId);

	int updateStatusByParentTreeCode(@Param("treeCode") String treeCode, @Param("status")Byte status);
	
	List<ComboboVo> selectComboboVo(@Param("projectId")Long  projectId,@Param("projectVersionId")Long  projectVersionId);
	
}
